using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace Microsoft.Practices.Repository
{
    /// <summary>
    /// Interface to factory class that generates DbCommand to
    /// update an existing domain object from the database.
    /// </summary>
    /// <typeparam name="TDomainObject">Type of the domain object.</typeparam>
    public interface IUpdateFactory<TDomainObject> : IDbToBusinessEntityNameMapper
    {
        /// <summary>
        /// Creates the update command.
        /// </summary>
        /// <param name="db">Entlib Database object to construct the command for.</param>
        /// <param name="domainObject">Domain object instance to be updated.</param>
        /// <returns>Initialized DbCommand object.</returns>
        DbCommand ConstructUpdateCommand(Database db, TDomainObject domainObject);
    }
}
